﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterALSafa.Master" AutoEventWireup="true"
    CodeBehind="TE_Exams.aspx.cs" Inherits="School.Pages.Teaching.TE_Exams" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlSearch" CssClass="clr fieldsettd" runat="server">
                <fieldset style="border: 1px solid #CCC">
                    <div id="hideshow">
                        <div class="col1">
                            <ul>
                                <li>المجمع
                                    <div class="field">
                                        <asp:DropDownList ID="ddlCampus" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                                            DataTextField="Name" DataValueField="Id" OnTextChanged="ddlCampus_TextChanged"
                                            Width="150px">
                                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="ddlCampus"
                                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                    </div>
                                </li>
                                <li>الشهاده
                                    <div class="field">
                                        <asp:DropDownList ID="ddlCertificate" runat="server" AppendDataBoundItems="True"
                                            AutoPostBack="True" DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlCertificate_SelectedIndexChanged"
                                            Width="150px" TabIndex="1">
                                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="ddlCertificate"
                                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                    </div>
                                </li>
                                <li>المرحله
                                    <div class="field">
                                        <asp:DropDownList ID="ddlStadge" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                                            DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlStadge_SelectedIndexChanged"
                                            Width="150px" TabIndex="2">
                                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlStadge"
                                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                    </div>
                                </li>                                                                 
                            </ul>                            
                        </div>
                        <div class="col2">
                            <ul>
                                <li>الصف
                                    <div class="field">
                                        <asp:DropDownList ID="ddlGrade" runat="server" AppendDataBoundItems="True" DataTextField="Name"
                                            DataValueField="Id" Width="150px" TabIndex="3" AutoPostBack="True" OnSelectedIndexChanged="ddlGrade_SelectedIndexChanged">
                                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddlGrade"
                                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                    </div>
                                </li>
                                <li>اسم الإمتحان
                                    <div class="field">
                                        <asp:TextBox ID="TxtName" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtName"
                                            Display="Dynamic" ErrorMessage="RequiredFieldValidator" ForeColor="Red" ValidationGroup="e">*</asp:RequiredFieldValidator>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div style="clear:both" />
                        <div class="field">
                                     <asp:Button ID="btnsave" runat="server" Text="حفظ" onclick="btnsave_Click" 
                                         ValidationGroup="st" />
                                    </div>
                    </div>
                </fieldset>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:Label ID="lbltst" runat="server" Text="" Visible="False"></asp:Label>
                <asp:GridView ID="gvExam" runat="server" AutoGenerateColumns="False" Width="100%"
                        CssClass="Grid" HeaderStyle-CssClass="GridHeaderFooter" FooterStyle-CssClass="GridHeaderFooter"
                        PagerStyle-CssClass="GridPager" AlternatingRowStyle-CssClass="GridItemAltername"
                        DataKeyNames="Id" ShowFooter="True">
                    <AlternatingRowStyle CssClass="GridItemAltername" />
                    <Columns>
                        <asp:BoundField DataField="Name" HeaderText="الاختبار" SortExpression="Name" />
                    </Columns>
                    <FooterStyle CssClass="GridHeaderFooter" />
                    <HeaderStyle CssClass="GridHeaderFooter" />
                    <PagerStyle CssClass="GridPager" />
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
